﻿(function (module) {
    var ctrl = function ($log, $scope, $rootScope, $state) {
        var currentStateName = $state.current.name;

        $log.debug('secondStepController.ctor:', $state.params);

        $scope.$on('$destroy', function () {
            $log.debug('secondStepController.$destroy');
        });

        $scope.previousStep = function () {
            $log.debug('previous step');

            $rootScope.$state.transitionTo('wizard.firstStep');
        };
    };
    ctrl.$inject = ['$log', '$scope', '$rootScope', '$state'];

    module.controller('secondStepController', ctrl);
}(angular.module('topics.controllers')));
